package com.wanxi.wrapper;

import java.util.Scanner;

public class Wrapper {
    public static void main(String[] args) {
        //基本数据转包装类
        int a = 10;

        Integer aa=10;//自动装箱
        int aaaa = aa;//自动拆箱

        Integer a1 = Integer.valueOf(a);
        Integer a2 = Integer.valueOf(100);

        boolean b = true;

        Boolean bb = true;//自动装箱

        boolean bbbb= bb;//自动拆箱

        Boolean b1 = Boolean.valueOf(b);
        Boolean b2 = Boolean.valueOf(true);
        Boolean b3 = Boolean.valueOf("TUre");

        float c = 1.2f;
        Float c1= Float.valueOf("1.5F");
        Float C2=Float.valueOf(c);
        Float C3=Float.valueOf(12.5F);



        //包装类转基本数据
        int a3= a1.intValue();

        boolean b4 = b1.booleanValue();

        Float c4 = a1.floatValue();


        int d1 = 10;
        String d2 = String.valueOf(10);
        String d3 = String.valueOf(d1);


        String e1="12350";
        int e2=Integer.parseInt(e1);//字符串转对应的数据类型。

        String f1="true";
        boolean f2=Boolean.getBoolean(f1);
        System.out.println(f2);


        System.out.println(e2);


    }
}
